<div class="col-sm-8 content">
  <div class="form-group ml2 mb22">
    <label class="radio-inline" ng-repeat="item in dateRangeCategory">
      <input type="radio" ng-model="data.dateType" value="{{item.type}}">{{item.name}}</input>
    </label>
  </div>

  <div class="animate-switch-container" ng-switch on="data.dateType">
    <!-- <div class="animate-switch" ng-switch-when="1"></div> -->
    <div class="animate-switch" ng-switch-when="SELECTED_DATES" >
      <div class="col-sm-12 ">
        <div class="row">
          <label  class="col-sm-12 text-left">选择日期<div class="btn btn-default" ng-click="tem.dateun=0" ng-show="tem.dateun">展开日历</div>
          </label>
          <div class="col-sm-5">
            <div class="datelist" ng-hide="tem.dateun">
              <div class="controle">
                <div class="col-sm-3 text-center">
                  <div class="row">
                    <div ng-click="datego(-1)"  class="btn btn-default btn-sm" ng-class="{'disabled':dare.i==0}"> <i class="glyphicon glyphicon-chevron-left"></i>
                    </div>
                  </div>
                </div>

                <div class="col-sm-6 text-center">
                  <div  class="row">
                    <span class="datecontrol" ng-bind="date.year+'年'+date.month+'月'"></span>
                  </div>

                </div>
                <div class="col-sm-3 text-center">
                  <div class="row">
                    <div ng-class="{'disabled':dare.i==0}"  ng-click="datego(1)"  class="btn btn-default btn-sm"> <i class="glyphicon glyphicon-chevron-right"></i>
                    </div>
                  </div>
                </div>

              </div>
              <div class="weektitle">
                <div class="weekson" ng-repeat="week in date.week" ng-bind="week"></div>
              </div>
              <div class="datecontent">
                <div class="dateout">
                  <div  ng-repeat="dates in date.dates" >
                    <div class="dateson" ng-class="{'bordert':$index<7,'borderr':($index+1)%7==0}" ng-if="dates.day">
                      <a ng-class="{'active':dateRange.effectDates[dates.ture],'bordert':$index<8,'borderr':($index+1)%7==0}" ng-click="clickDay(dates.ture, dateRange.effectDates)" ng-bind="dates.day" ng-if="!dates.color||dateRange.effectDates[dates.ture]"></a>
                      <span ng-class="{'active':dateRange.effectDates[dates.ture],'bordert':$index<8,'borderr':($index+1)%7==0}" style="color:#ddd" ng-bind="dates.day" ng-if="dates.color&&!dateRange.effectDates[dates.ture]"></span>
                    </div>

                    <div class="dateson"  ng-class="{'bordert':$index<7,'borderr':($index+1)%7==0}"  ng-if="!dates.day"></div>
                  </div>
                </div>
              </div>
              <div class="col-sm-6 col-sm-offset-6">
                <div class="btn btn-default" ng-click="tem.dateun=1">收起</div>
              </div>
            </div>

          </div>
          <div class="col-sm-7">

            <div class="col-sm-4 mt20" ng-repeat="(key, value) in dateRange.effectDates" ng-if="$index<11">
              <span ng-bind="key" class="label label-danger " ng-if="$index<10"></span>
              <span ng-if="$index==10">更多日期请查看列表</span>
            </div>
          </div>

        </div>
      </div>
    </div>

    <div class="animate-switch" ng-switch-when="CONTINUOUS">
      <div class="row ml25">
        <div class="col-sm-6 " >
          <div class="row">
            <label  class="col-sm-3 control-label text-left" >开始</label>
            <div class="col-sm-9">
              <p class="input-group">
                <input  class="form-control" datepicker-popup ng-model="dateRange.startDate" is-open="opened.startTime" min-date="dateOptions.dftDate" max-date="dateOptions.maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" show-weeks="flase" ng-change="changeEnd()" name="startTime"/>
                <span class="input-group-btn">
                  <button type="button" class="btn btn-default" ng-click="open($event,'startTime')"><i class="glyphicon glyphicon-calendar"></i></button>
                </span>
              </p>
            </div>

          </div>
        </div>
        <div class="col-sm-6 ">
          <div class="row">
            <label  class="col-sm-3 control-label text-left">结束</label>
            <div class="col-sm-9">
              <p class="input-group">
                <input  class="form-control" datepicker-popup ng-model="dateRange.endDate" is-open="opened.endTime" min-date="dateOptions.minDate" max-date="dateOptions.maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" show-weeks="flase" ng-change="changeEnd()" name="endTime"/>
                <span class="input-group-btn">
                  <button type="button" class="btn btn-default" ng-click="open($event,'endTime')"><i class="glyphicon glyphicon-calendar"></i></button>
                </span>
              </p>
            </div>
          </div>
        </div>
        <div  class="col-sm-12 form-control-stack text-left">
          <label class="checkbox-inline">
            <input type="checkbox" ng-model="pick.excludeWeekend">排除周末</input>
          </label>
        </div>
      </div>
    </div>

    <div class="animate-switch" ng-switch-when="AROUND_FIX_DATE">
      <div class="ml25">
        <div class="col-sm-10">
          <div class="form-group">
            <label class="col-sm-offset-1 control-label" >请设置在生日当天的前后几天可参加本活动</label>
          </div>
          <div class="form-group mt15">
            <span class="col-sm-offset-1 form-control-static">
            如生日前后都写0天，则表示生日当天
          </span>
          </div>
          <div class="col-sm-offset-1 form-inline mt20">
            <div class="form-group">
              <span class="form-control-static">生日前</span>
              <label for="" class="sr-only"></label>
              <input class="form-control" type="number" min="0" ng-model="dateRange.beforeDays" placeholder="可填写0" name="beforeDays" required></input>
              <span class="form-control-static">天</span>
            </div>
          </div>
          <div class="col-sm-offset-1 form-inline mt20">
            <div class="form-group">
              <span class="form-control-static">生日后</span>
              <label for="" class="sr-only"></label>
              <input class="form-control" type="number" min="0" ng-model="dateRange.afterDays" placeholder="可填写0" name="afterDays" required></input>
              <span class="form-control-static">天</span>
            </div>
          </div>
        </div>

      </div>
    </div>

    <div class="animate-switch" ng-switch-when="EXCLUDE_MONTH_DAYS">
      <div class="ml25">
        <div class="col-sm-10">
          <div class="form-group">
            <label class="control-label" >排除每月中的指定天</label>
          </div>

          <div class="form-inline mt20">
            <div class="form-group">
              <span class="form-control-static">每月中的</span>
              <label for="" class="sr-only"></label>
              <input class="form-control" type="text"  ng-model="dateRange.excludeDays" placeholder="请填写排除的日期，用逗号分开，如1,10" ng-style="{width:'300px'}" name="excludeDays" required></input>
              <span class="form-control-static">将被排除。</span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="animate-switch" ng-switch-when="EXCLUDE_WEEKLY_DAY">
      <div class="ml25">
        <div class="col-sm-10">
          <div class="form-group">
            <label class="control-label">排除每周中的指定天</label>
          </div>

          <div class="form-group timecheck mt20">
            <div class="col-sm-12 ">
              <label class="btn glyphicon btn-default" ng-repeat="item in week" ng-class="{active:dateRange.excludeWeekly[item.idx]}" ng-click="clickDay(item.idx, dateRange.excludeWeekly)" ng-bind="item.value"></label>
            </div>
          </div>

        </div>
      </div>
    </div>

    <div class="animate-switch" ng-switch-when="INCLUDE_MONTH_DAYS">
      <div class="ml25">
        <div class="col-sm-10">
          <div class="form-group">
            <label class="control-label">每月指定日期有效</label>
          </div>

          <div class="form-inline mt20">
            <div class="form-group">
              <span class="form-control-static">每月中的</span>
              <label for="" class="sr-only"></label>
              <input class="form-control" type="text"  ng-model="dateRange.includeDays" placeholder="请填写选中的日期，用逗号分开，如1,10" ng-style="{width:'300px'}" name="includeDays" required></input>
              <span class="form-control-static">有效。</span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="animate-switch" ng-switch-when="INCLUDE_WEEKLY_DAY">
      <div class="ml25">
        <div class="col-sm-10">
          <div class="form-group">
            <label class="control-label">每周指定日期有效</label>
          </div>
          <div class="form-group timecheck mt20">
            <div class="col-sm-12 ">
              <label class="btn glyphicon btn-default" ng-repeat="item in week" ng-class="{active:dateRange.includeWeekly[item.idx]}" ng-click="clickDay(item.idx, dateRange.includeWeekly)" ng-bind="item.value"></label>
            </div>
          </div>

        </div>
      </div>
    </div>

    <div class="animate-switch" ng-switch-when="AUTOMATIC_DAY_DELAY">
      <div class="ml25">
        <div class="col-sm-10">
          <div class="form-group">
            <label class="control-label">指定延迟日期及有效期</label>
          </div>
          <div class="form-group mt20">
            <div class="form-inline">
              <span class="form-control-static">延迟</span>
              <input type="number" min="0" class="form-control" ng-model="dateRange.delayedDays" required/>
              <span class="form-control-static">天生效，有效期为</span>
              <input type="number" min="0" class="form-control" ng-model="dateRange.effectDays" required/>
              <span class="form-control-static">天</span>
            </div>

          </div>
        </div>
      </div>
    </div>

  </div>
</div>
